﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>阳光好车</title>
    <link rel="stylesheet" type="text/css" href="/css/base.css"/>
    <link rel="stylesheet" type="text/css" href="/css/home.css"/>
    <link rel="stylesheet" type="text/css" href="/city/city.css">
    <link rel="stylesheet" type="text/css" href="/css/common.css">
    <link rel="stylesheet" type="text/css" href="/css/ranking-list.css">
    <script type="text/javascript" src="/script/jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="/script/home_ban.js"></script>
    <script type="text/javascript" src="/script/eg_top_search.js"></script>
    <script type="text/javascript" src="/script/city.js"></script>
    <script type="text/javascript" src="/script/snncar.js"></script>
    <script type="text/javascript">
        $(function(){
            $('.navmenu li').hover(function(){
                $('span',this).stop().css('height','2px');
                $('span',this).animate({
                    left:'0',
                    width:'100%',
                    right:'0'
                },200);
            },function(){
                $('span',this).stop().animate({
                    left:'50%',
                    width:'0'
                },200);
            });
        });
    </script>
    <!--导航登陆网页版下拉-->
    <script type="text/javascript">
        $(function () {
            var setTime;
            $(".egc-top .nav-cent .operate").hover(function () {
                var _this = $(this);
                setTime = setTimeout(function () {
                    _this.find(".sec-version").slideDown(200);
                    _this.find("i").removeClass("icon-angle-down").addClass("icon-angle-up");
                }, 200);
            }, function () {
                if (setTime) {
                    clearTimeout(setTime);
                }
                $(".egc-top .nav-cent .sec-version").slideUp(200);
                $(".egc-top .nav-cent .operate i").removeClass("icon-angle-up").addClass("icon-angle-down");
            });
        });
    </script>
    <!--底部信息下拉-->
    <script type="text/javascript">
        $(function () {
            var wind_wd = $(window).width();
            if(wind_wd<=735){
                /* $submenu.first().delay(400).slideDown(700);*/
                $('.relate .tit').on('click', function() {
                    $(this).next('.con').slideToggle()
                    $(this).parent().siblings('.items').find('.con').slideUp();
                });
            }else{
                $('.relate .tit').unbind("click");
                $('.relate .con').show();
            }
            $(window).resize(function(){
                var wind_wd = $(window).width();
                if(wind_wd<=735){
                    /* $submenu.first().delay(400).slideDown(700);*/
                    $('.relate .tit').on('click', function() {
                        $(this).next('.con').slideToggle()
                        $(this).parent().siblings('.items').find('.con').slideUp();
                    });
                }else{
                    $('.relate .tit').unbind("click");
                    $('.relate .con').show();
                }
            });
        });
    </script>

    <!--搜搜框获取焦点-->
    <script type="text/javascript">
        $(function () {
            $('.sea-ipt-txt').focus(function() {
                $(this).addClass("on");
                $('.search-btn').addClass("on");
            });
            $('.sea-ipt-txt').blur(function() {
                $(this).removeClass("on");
                $('.search-btn').removeClass("on");
            });
        });
    </script>
    <!--下拉导航关闭-->
    <script type="text/javascript">
        $(function () {
            $('.menu-mb i').click(function() {
                $(".navigation-mb-list").slideDown(300);
            });
            $('.navigation-mb-list .list-close-btn').click(function() {
                $(".navigation-mb-list").slideUp(300);
            });
        });
    </script>
    <!--stress搜索关闭-->
    <script type="text/javascript">
        $(function () {
            var setTime;
            $(".sercat .weixin").hover(function () {
                setTime = setTimeout(function () {
                    $(".sercat .wxewm").show();
                }, 300);
            }, function () {
                if (setTime) {
                    clearTimeout(setTime);
                }
                $(".sercat .wxewm").hide();
            });
        });
    </script>
    <script type="text/javascript">
        $(function () {
            var scroll_heitht = $('body').offset().top;
            var isShow = true;
            $(window).scroll(function () {
                if ($(window).scrollTop() > scroll_heitht && isShow) {
                    $('.stress-search-box').slideDown(200);
                }else{
                    $('.stress-search-box').slideUp(200);
                }
            });
            $('.stress-close a').click(function(){
                isShow=false;
                $('.stress-search-box').slideUp(200).unbind(window,aa);
            });
        });
    </script>
</head>
<body>
<div class="egc-top">
    <div class="nav-cent">
        <div class="top-r"> <a href="#" id="b-regist">注册</a>|<a href="#" id="b-login" class="b-login">登陆</a> </div>
        <div class="top-l">全国统一客服热线：400-877-9288</div>
        <div class="clear_fix"></div>
    </div>
</div>
<div class="navigation">
    <div class="nav-cent">
        <div class="logo"><a href="index.html"><img src="images/logo.png" width="240" /></a></div>
        <div class="city"> <span id="DY_site_name" class="red city-name Left">合肥</span>
            <div id="JS_hide_city_menu_11" class="city-select cut_handdler Left"> <a href="javascript:void(0);" class="common-bg selector">切换城市</a>
                <div id="JS_header_city_bar_box" class="hide_city_group">
                    <div class="hideMap">
                        <div class="showPanel clearfix">
                            <div class="Left mycity">
                                <div id="JS_current_city_box"> 当前城市：<strong id="JS_city_current_city">合肥</strong> </div>
                                <div id="JS_default_city_delete" style="display: none;"></div>
                            </div>
                        </div>
                        <div class="showPanel showPanel2 clearfix">
                            <div class="hot_city" id="JS_header_city_hot"> </div>
                            <div class="city_words mt10" id="JS_header_city_char"> </div>
                        </div>
                        <div class="scrollBody">
                            <div class="cityMap clearfix">
                                <table id="JS_header_city_list" class="city_list" style="margin-top: 0px;">
                                    <tbody>
                                    </tbody>
                                </table>
                            </div>
                            <div class="scrollBar"> <span id="JS_header_city_bar" style="margin-top: 0px;"></span> </div>
                        </div>
                    </div>
                </div>
            </div>
            <span class="common-bg city-logo"></span> </div>
        <div class="sea">
            <div class="egc-sea-box">
                <input id="searchName" type="text" th:value="${searchName}"  class="input-error input-xxlarge" />
                <button class="sui-btn btn-xlarge btn-danger" type="button" onclick="listSearchByName(0, 10)">搜索</button>
            </div>
            <div class="hot-phone"> <i></i> <span class="js-change-phone">400-877-9288</span> </div>
        </div>
    </div>
    <ul class="navmenu">
        <li class="active"><a href="index.html">首页</a><span></span></li>
        <li><a href="list.html">我要买车</a><span></span></li>
        <li><a href="wymc.html">我要卖车</a><span></span></li>
        <li><a href="#">阳光联盟</a><span></span></li>
        <li><a href="#">我要加盟</a><span></span></li>
    </ul>
    <div class="clear_fix"></div>
    <div class="stress-search-box row">
        <div class="stress-close"><a href="javascript:;"></a></div>
        <div class="nav-cents">
            <ul>
                <li class="logo"><a href="index.html"><img src="images/logo.png"  width="180"/></a></li>
                <li><a href="index.html">首页</a></li>
                <li><a href="list.html">我要买车</a></li>
                <li><a href="wymc.html">我要卖车</a></li>
                <li><a href="#">阳光联盟</a></li>
                <li><a href="#">我要加盟</a></li>
            </ul>
            <div class="seas">
                <div class="egc-sea-box">
                    <input type="text"  th:value="${searchName}" class="sea-ipt-txt" placeholder="搜索您想要的车">
                    <button class="sui-btn btn-xlarge btn-danger" onclick="listSearchByName(0, 10)" type="button">搜索</button> </div>
            </div>
        </div>
    </div>
    <div class="clear_fix"></div>
    <!--所在位置-->
    <div class="crumbp"> <a href="#">首页</a> <em>&gt;</em> <span>个人二手车</span> </div>
    <div class="mainbox">
        <!--搜索条件-->
        <div class="comfilter-bd">
            <div class="filterBox">
                <dl class="fliter-bd clearfix">
                    <dt>品牌：</dt>
                    <select id="selectbrands" onchange="selectSeries(this)">
                    </select>
                </dl>
                <dl class="fliter-bd clearfix">
                    <dt>车系：</dt>
                    <dd class="clickTagWidget">
                        <select  id="series" onchange="selectSeriesId();">
                        </select>
                </dl>

                <div class="moreitem clearfix">
                    <span>更多：</span>
                    <dl class="selecter">
                        车龄：
                          <select id="age" onchange="selectSeriesId()">
                          </select>
                    </dl>
                    <dl class="selecter">
                        车型:
                        <select id="carType" onchange="selectSeriesId()">
                        </select>
                    </dl>
                    <dl class="selecter">
                        颜色:
                        <select  id="carColor" onchange="selectSeriesId()">
                        </select>
                        </dd>
                    </dl>
                    <dl class="selecter">
                        座位数:
                        <select  id="seating" onchange="selectSeriesId()">
                        </select>
                    </dl>
                    <dl class="selecter">
                        里程:
                        <select  id="mileage" onchange="selectSeriesId()">
                        </select>
                        </dd>
                    </dl>
                    <dl class="selecter">
                        排放标准:
                        <select id="emissionStandard" onchange="selectSeriesId()">
                        </select>
                        </dd>
                    </dl>

                </div>

            </div>
            <div class="sel-menu clearfix">
                <p class="sel-p">当前筛选&gt;</p>
                <a href="#"  class="sel-a">大众</a> <a href="#"  class="sel-reset">重置</a>
                <p class="sel-p">共为您找到<b>508</b>辆好车</p>
            </div>
        </div>
        <div class="seqBox clearfix">
            <p class="fr seqtype">共找到<b>3430</b>辆 </p>
            <ul class="sequen">
                <li class="first"><a href="#" >默认排序</a></li>
                <li> <a href="#" title="" >最新发布 </a> </li>
                <li> <a href="#" title="">价格<i class="up"></i> </a> </li>
                <li> <a href="#" title="">车龄<i class="up"></i> </a> </li>
                <li> <a href="#" title="">里程<i class="up"></i> </a> </li>
            </ul>
            <ul id="checkArea" class="screen-input tagTypesFilterNew">
                <li>
                    <input type="checkbox" id="chaozhi">
                    <label for="chaozhi">超值</label>
                </li>
                <li>
                    <input type="checkbox" id="jishou">
                    <label for="jishou">急售</label>
                </li>
                <li >
                    <input type="checkbox" id="zhunxinche">
                    <label for="zhunxinche">准新车</label>
                </li>
                <li >
                    <input type="checkbox" id="keqianquanguo">
                    <label for="keqianquanguo">可迁全国</label>
                </li>
            </ul>
        </div>
        <ul class="carList" id="carList">
           
        </ul>
    </div>
    <div class="pages">  <div class="fr page">
        <div id="pageId" class="sui-pagination pagination-large"></div>
    </div>
        <div class="clear_fix"></div>
        <!--底部-->
        <div class="ftWrap">
            <div class="foot">
                <div class="cent">
                    <div class="relate">
                        <div class="items">
                            <div class="tit"><i class="icon-angle-right"></i>交易帮助</div>
                            <div class="con"> <a href="#">买车帮助</a> <a href="#">卖车帮助</a> <a href="#">过户帮助</a> </div>
                        </div>
                        <div class="items">
                            <div class="tit"><i class="icon-angle-right"></i>客服中心</div>
                            <div class="con"> <a href="abut.html">网站合作</a> <a href="about.html">关于我们</a> <a href="contact.html">联系我们</a> </div>
                        </div>
                        <div class="items">
                            <div class="tit"><i class="icon-angle-right"></i>购车指南</div>
                            <div class="con"> <a href="#">购车帮助</a></div>
                        </div>
                        <div class="app-section"> <img class="js-delayed-img"  src="images/f_wx.jpg">
                            <div class="title">扫码关注微信</div>
                            <p> 随时随地，秒杀好车<br />
                                优质个人二手车 </p>
                        </div>
                        <div class="items last">
                            <div class="tel">
                                <h1>400-877-9288</h1>
                                <p>周一至周日 8:00-18:00</p>
                                <p>免费咨询(咨询、建议、投诉)</p>
                                <a href="#" class="kf"><i class="kf-icon"></i>在线客服</a> </div>
                            <div class="tel-mb">
                                <p><span>400-710-8886</span>周一至周日 8:00-18:00(仅收市话费)</p>
                                <a href="#" class="kf"><i class="kf-icon"></i>在线客服</a> </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="copyright">
                <div class="cent"> Copyright © 2016-2017, snncar.com,All Rights Reserved 皖ICP备16022456号-1</div>
            </div>
        </div>
        <script type="text/javascript" src="script/3c-menu.js"></script>
        <script type="text/javascript" src="script/lg_reg.js"></script>
        <!--会员登录和注册弹出框开始-->
        <div id="popBox">
            <div class="popCont"> <a class="p_closed">关闭</a>
                <div class="p-tab"> <a>会员登录<i></i></a><a>会员注册<i></i></a> </div>
                <div class="p-detail">
                    <div class="p-dl">
                        <form onsubmit="return check();" enctype="multipart/form-data" method="post" name="form" id="form">
                            <ul class="login-items">
                                <li>
                                    <label>用户名(手机号)</label>
                                    <input class="input" type="text" value="" maxlength="32"  name="username" placeholder="请输入您的手机号">
                                </li>
                                <li>
                                    <label>密码</label>
                                    <input class="input" type="password" value="" maxlength="16"  name="password">
                                </li>
                            </ul>
                            <div class="login-check">
                                <input type="checkbox" name="checkbox" style=" width:auto;" />
                                <label>记住我</label>
                                <a href="Meet/editPass">忘记登录密码？</a> </div>
                            <div class="login-button">
                                <input type="hidden" value="" name="carid" class="ordercarid" />
                                <input type="hidden" value="" name="carstatus" class="orderstatus" />
                                <input type="button"  value="登&nbsp;&nbsp;&nbsp;&nbsp;陆" class="fM" onclick="$('#form').submit()" />
                            </div>
                        </form>
                    </div>
                    <div class="p-dl">
                        <form class="registForm" onsubmit="return regcheck();" enctype="multipart/form-data" method="post" name="reg" id="reg">
                            <ul class="login-items">
                                <li class="clearfix">
                                    <input class="input" name="mobile" id="mobile" type="text" value="" placeholder="手机号码（登录帐号）">
                                </li>
                                <li class="clearfix">
                                    <input class="input left" type="text" value=""  name="verify" placeholder="输入验证码" style="width:100px;" />
                                    <div id="send"><a href="#" class="send_code right">获取验证码</a></div>
                                </li>
                                <li class="clearfix">
                                    <input class="input" type="text" value=""  name="realname" placeholder="姓名">
                                </li>
                                <li class="clearfix sex">
                                    <input type="radio" checked="" name="gender" value="M" />
                                    男&nbsp;&nbsp;&nbsp;&nbsp;
                                    <input type="radio" name="gender" value="F" />
                                    女 </li>
                                <li class="clearfix">
                                    <input id="" class="input" type="password" name="password" value="" placeholder="输入密码（六位字符）">
                                </li>
                            </ul>
                            <div class="login-button">
                                <input type="hidden" value="" name="carid" class="ordercarid" />
                                <input type="hidden" value="" name="carstatus" class="orderstatus" />
                                <input type="button"  value="立即注册" class="fM" onclick="$('#reg').submit()" />
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <!--会员登录和注册弹出框结束-->
        <script>
            $(function(){
                var t=null,$this,i=0;
                //品牌
                $(".brand-all").bind({
                    mouseenter:function(){
                        $(this).find(".otherbrand").show();
                    },
                    mouseleave:function(){
                        $(this).find(".otherbrand").hide();
                    }
                });

            });
        </script>
        <script type="text/javascript">
            $(".hoverWidget").each(function() {
                $(this).mouseenter(function() {
                    $(this).addClass("active")
                }).mouseleave(function() {
                    $(this).removeClass("active")
                })
            });
        </script>
        <div id="leftsead">
            <ul>
                <li>
                    <a id="top_btn">
                        <img src="images/foot03/ll06.png" width="47" height="49" class="hides"/>
                        <img src="images/foot03/l06.png" width="47" height="49" class="shows" />
                    </a>
                </li>

                <li>
                    <a href="">
                        <img src="images/foot03/ll03.png"  width="47" height="49" class="hides"/>
                        <img src="images/foot03/l03.png" width="47" height="49" class="shows" />
                    </a>
                </li>

                <li>
                    <a href="">
                        <img src="images/foot03/ll02.png" width="166" height="49" class="hides"/>
                        <img src="images/foot03/l04.png" width="47" height="49" class="shows" />
                    </a>
                </li>

                <li>
                    <a class="youhui">
                        <img src="images/foot03/l02.png" width="47" height="49" class="shows" />
                        <img src="images/foot03/zfew.jpg" width="196" height="205" class="hides" usemap="#taklhtml"/>
                    </a>
                </li>



            </ul>
        </div><!--leftsead end-->


        <script type="text/javascript">
            $(document).ready(function(){

                $("#leftsead a").hover(function(){
                    if($(this).prop("className")=="youhui"){
                        $(this).children("img.hides").show();
                    }else{
                        $(this).children("img.hides").show();
                        $(this).children("img.shows").hide();
                        $(this).children("img.hides").animate({marginRight:'0px'},'slow');
                    }
                },function(){
                    if($(this).prop("className")=="youhui"){
                        $(this).children("img.hides").hide('slow');
                    }else{
                        $(this).children("img.hides").animate({marginRight:'-143px'},'slow',function(){$(this).hide();$(this).next("img.shows").show();});
                    }
                });

                $("#top_btn").click(function(){if(scroll=="off") return;$("html,body").animate({scrollTop: 0}, 600);});

            });
        </script>
        <script type="text/javascript">
            $(function(){
                $(".selecter").each(function(){
                    var s=$(this);
                    var z=parseInt(s.css("z-index"));
                    var dt=$(this).children("dt");
                    var dd=$(this).children("dd");
                    var _show=function(){dd.slideDown(200);dt.addClass("cur");s.css("z-index",z+1);};   //展开效果
                    var _hide=function(){dd.slideUp(200);dt.removeClass("cur");s.css("z-index",z);};    //关闭效果
                    dt.click(function(){dd.is(":hidden")?_show():_hide();});
                    dd.find("a").click(function(){dt.html($(this).html());_hide();});     //选择效果（如需要传值，可自定义参数，在此处返回对应的“value”值 ）
                    $("body").click(function(i){ !$(i.target).parents(".selecter").first().is(s) ? _hide():"";});
                })
            })



            function search() {
                var searchName = $("#searchId").val();
                if (searchName != null) {
                    location.href = "/search/toList?searchName=" + searchName;
                } else {
                    return;
                }
            }


            $(function () {
                listSearchByName(0, 10);
                selectbrand();
                selectSpecAge();
                selectSpecCarType();

                selectSpecColor();

                selectSpecSeating();

                selectSpecMileage();

                selectSpeceMissionStandard();

                selectSeriesId();
                selectDetailsId();

            });


            function listSearchByName(pageNum, pageSize) {
                var searchName = $("#searchName").val();
                $.ajax({
                    url : "/search/searchInfo",
                    type : "get",
                    data : {pageNum : pageNum, pageSize : pageSize, searchName : searchName},
                    dataType : "json",
                    success : function (result) {
                        if (result.code == 200) {
                            var page = result.data;
                            var data = page.result;
                            console.log(page);

                            var searchUlHtml = "";

                            $(data).each(function (i, e) {
                                searchUlHtml += "<li>";
                                searchUlHtml += "<div class='list-infoBox'>";
                                searchUlHtml += "<a  title='"+e.title+"'>";
                                searchUlHtml +="<img width='290' height='194' src='images/carimg.jpg' alt=''>";
                                searchUlHtml += "</a>";
                                searchUlHtml += " <p class='infoBox'> <a title='"+e.title+"' href='http://localhost/"+e.id+".html' target='_blank' class='info-title'>'"+e.title+"'</a> </p>";
                                searchUlHtml += "<p class='fc-gray'> <span class='tag-gray'>石家庄</span> <span>2014年11月上牌</span> <em class='shuxian'>|</em> 行驶2.4万公里 </p>";
                                searchUlHtml += "<p class='priType-s'><span><i class='fc-org priType'>'"+e.price+"'</i> </span> <s>'" + e.price + "'</s> </p>";
                                searchUlHtml += "</div>";
                                searchUlHtml += "</li>";
                            });

                            $("#carList").html(searchUlHtml);

                            var pageIdHtml = "<ul>";
                            pageIdHtml += "<li class='prev disabled'>";
                            pageIdHtml += "<a href='javascript:listSearchByName(" + (page.pageNum - 1) + ", 10)'>上一页»</a>";
                            pageIdHtml += "</li>";
                            $(page.totalPage).each(function (i, e) {
                                if (i == 0) {
                                    pageIdHtml += "<li class='active'>";
                                    pageIdHtml += "<a href='javascript:listSearchByName(" + i + ", 10)'>" + (i + 1) + "</a>";
                                    pageIdHtml += "</li>";
                                } else {
                                    pageIdHtml += "<li>";
                                    pageIdHtml += "<a href='javascript:listSearchByName(" + i + ", 10)'>" + (i + 1) + "</a>";
                                    pageIdHtml += "</li>";
                                }
                            });
                            pageIdHtml += "<li class='next'>";
                            pageIdHtml += "<a href='javascript:listSearchByName(" + (page.pageNum + 1) + ", 10)'>下一页»</a>";
                            pageIdHtml += "</li>";
                            pageIdHtml += "</ul>";
                            pageIdHtml += "<div>";
                            pageIdHtml += "<span>共" + page.totalPage + "页&nbsp;</span><span>到第<input id='pageInputId' type='text' class='page-num'>页 <button class='page-confirm' onclick='getPage()'>确定</button></span></div>";
                            pageIdHtml += "</div>";
                            $("#pageId").html(pageIdHtml);
                        } else {
                            console.log("查询商品失败");
                        }
                    },
                    error : function (result) {
                        console.log("系统错误");
                        console.log(result);
                    }
                });
            }

            function getPage() {
                var pageNum = $("#pageInputId").val();
                listSearchByName(pageNum, 10);
            }
            function selectbrand() {
                $.ajax({
                    url : "/sellCar/getBrandInfo",
                    type : "get",
                    data : {},
                    dataType : "json",
                    async : true,
                    success : function(result){
                        var list = result.data;
                        var html = "<option value=''>请选择</option>";
                        $(list).each(function(i,e){
                            html += "<option value='"+e["id"]+"'>"+ e["name"]+"</option>";
                        })
                        $("#selectbrands").html(html);
                    },
                    error :function(){
                        console.log("系统异常,请联系管理员");
                    }
                })

            }

            //车系
            function selectSeries(obj){
                var brandId = obj.value;
                $.ajax({
                    url : "/sellCar/selectByBrandId",
                    type : "post",
                    data : {brandId:brandId},
                    dataType : "json",
                    async : true,
                    success : function(result){
                        var list = result.data;
                        var html = "<option value=''>请选择</option>";
                        $(list).each(function(i,e){
                            html += '<option value="'+e["id"]+'">'+e["name"]+'</option>';
                        })
                        $("#series").html(html);
                    },
                    error :function(){
                        console.log("系统异常,请联系管理员");
                    }
                })
            }
            //通过规格id查询车龄
            function selectSpecAge(){
                $.ajax({
                    url : "/sellCar/selectBySpecId",
                    type : "post",
                    data : {specId:1},
                    dataType : "json",
                    async : true,
                    success : function(result){
                        var list = result.data;
                        var html = "<option value=''>请选择</option>";
                        $(list).each(function(i,e){
                            html += "<option value='"+e["detailsId"]+"'>"+ e["name"]+"</option>";
                        })
                        $("#age").html(html);
                    },
                    error :function(){
                        console.log("系统异常,请联系管理员");
                    }
                })
            }

            //通过规格id查询车型
            function selectSpecCarType(){
                $.ajax({
                    url : "/sellCar/selectBySpecId",
                    type : "post",
                    data : {specId:2},
                    dataType : "json",
                    async : true,
                    success : function(result){
                        var list = result.data;
                        var html = "<option value=''>请选择</option>";
                        $(list).each(function(i,e){
                            html += "<option value='"+e["detailsId"]+"'>"+ e["name"]+"</option>";
                        })
                        $("#carType").html(html);
                    },
                    error :function(){
                        console.log("系统异常,请联系管理员");
                    }
                })
            }

            //通过规格id查询颜色
            function selectSpecColor(){
                $.ajax({
                    url : "/sellCar/selectBySpecId",
                    type : "post",
                    data : {specId:3},
                    dataType : "json",
                    async : true,
                    success : function(result){
                        var list = result.data;
                        var html = "<option value=''>请选择</option>";
                        $(list).each(function(i,e){
                            html += "<option value='"+e["detailsId"]+"'>"+ e["name"]+"</option>";
                        })
                        $("#carColor").html(html);
                    },
                    error :function(){
                        console.log("系统异常,请联系管理员");
                    }
                })
            }

            //通过规格id查询座位
            function selectSpecSeating(){
                $.ajax({
                    url : "/sellCar/selectBySpecId",
                    type : "post",
                    data : {specId:9},
                    dataType : "json",
                    async : true,
                    success : function(result){
                        var list = result.data;
                        var html = "<option value=''>请选择</option>";
                        $(list).each(function(i,e){
                            html += "<option value='"+e["detailsId"]+"'>"+ e["name"]+"</option>";
                        })
                        $("#seating").html(html);
                    },
                    error :function(){
                        console.log("系统异常,请联系管理员");
                    }
                })
            }

            //通过规格id查询里程
            function selectSpecMileage(){
                $.ajax({
                    url : "/sellCar/selectBySpecId",
                    type : "post",
                    data : {specId:10},
                    dataType : "json",
                    async : true,
                    success : function(result){
                        var list = result.data;
                        var html = "<option value=''>请选择</option>";
                        $(list).each(function(i,e){
                            html += "<option value='"+e["detailsId"]+"'>"+ e["name"]+"</option>";
                        })
                        $("#mileage").html(html);
                    },
                    error :function(){
                        console.log("系统异常,请联系管理员");
                    }
                })
            }

            //通过规格id查询排放标准
            function selectSpeceMissionStandard() {
                $.ajax({
                    url: "/sellCar/selectBySpecId",
                    type: "post",
                    data: {specId: 11},
                    dataType: "json",
                    async: true,
                    success: function (result) {
                        var list = result.data;
                        var html = "<option value=''>请选择</option>";
                        $(list).each(function (i, e) {
                            html += "<option value='" + e["detailsId"] + "'>" + e["name"] + "</option>";
                        })
                        $("#emissionStandard").html(html);
                    },
                    error: function () {
                        console.log("系统异常,请联系管理员");
                    }
                })
            }




            //根据车系 查询es
            function selectSeriesId() {
                var carSeriesId = $("#series").val();
                var age = $("#age").val();
                var carType = $("#carType").val();
                console.log(carType);
                var carColor = $("#carColor").val();
                console.log(carColor);
                var mileage = $("#mileage").val();
                console.log(mileage);
                var seating = $("#seating").val();
                console.log(seating);
                var emissionStandard = $("#emissionStandard").val();
                console.log(emissionStandard);
                var detailsId = age+carType+carColor+mileage+seating+emissionStandard;
                console.log(detailsId);
                $.ajax({
                    url: "/search/selectCarSeriesId",
                    type: "post",
                    data: {pageNum: 0,pageSize:10,carSeriesId:carSeriesId,detailsId:detailsId},
                    dataType: "json",
                    async: true,
                    success: function (result) {
                        if (result.code == 200) {
                            var page = result.data;
                            var data = page.result;
                            var searchUlHtml = "";
                            $(data).each(function (i, e) {
                                searchUlHtml += "<li>";
                                searchUlHtml += "<div class='list-infoBox'>";
                                searchUlHtml += "<a  title='" + e.title + "'>";
                                searchUlHtml += "<img width='290' height='194' src='images/carimg.jpg' alt=''>";
                               searchUlHtml += "</a>";
                               searchUlHtml += " <p class='infoBox'> <a title='" + e.title + "' href='http://localhost/"+e.id+".html' target='_blank' class='info-title'>'" + e.title + "'</a> </p>";
                                searchUlHtml += "<p class='fc-gray'> <span class='tag-gray'>石家庄</span> <span>2014年11月上牌</span> <em class='shuxian'>|</em> 行驶2.4万公里 </p>";
                                searchUlHtml += "<p class='priType-s'><span><i class='fc-org priType'>'" + e.price + "'</i> </span> <s>'" + e.price + "'</s> </p>";
                                searchUlHtml += "</div>";
                                searchUlHtml += "</li>";
                            })
                            $("#carList").html(searchUlHtml);
                        }
                    },
                    error: function () {
                        console.log("系统异常,请联系管理员");
                    }
                })
            }

            //根据车系 查询es
            function selectCarType() {

                console.log(carType);
            }



            //根据规格模糊查询es
            function selectDetailsId() {
                var age = $("#age").val();
                var carType = $("#carType").val();
                var carColor = $("#carColor").val();
                var mileage = $("#mileage").val();
                var seating = $("#seating").val();
                var emissionStandard = $("#emissionStandard").val();
            }
        </script>
</body>
</html>